<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="../language.jsp" %>

<%
	request.setAttribute("registerLocation",request.getParameter("registerLocation"));
	request.setAttribute("contactNo",request.getParameter("contactNo"));
	request.setAttribute("recommendUser",request.getParameter("recommendUser"));
	request.setAttribute("declarationCenters",request.getParameter("declarationCenters"));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<title><fmt:message key="i18n.userReg" />-<fmt:message key="i18n.title"/></title>
	<link rel="shortcut icon" href="../images/favicon.png" />
	<link rel="stylesheet" type="text/css" href="../skin/skin1/css/css.css" />
	<!-- this page specific styles -->
	<link rel="stylesheet" href="css/compiled/signin.css" type="text/css" media="screen" />
	<script type="text/javascript" src="../scripts/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="../scripts/user/common.js"></script>
	<script type="text/javascript" src="../scripts/user/reguser.js"></script>
<script type="text/javascript">

$(function(){
	$("#register_form_submit").click(function(){
		checkRegisterForm();
	});
	var resultStr = "${resultStr}";var loginName = "${resultStrLoginName}";
	if ( loginName !== "" && resultStr !== ""){
		//alert( resultStr );
		$("#registerAccount").val( loginName );
		if("SUCCESSFUL" === resultStr){
			alert( "注册成功,系统将自动跳转到登录页面" );
			window.location.href = "login.jsp"
		}else if("ACTIVATION_CODE_ERROR" === resultStr){
			alert( "验证码错误" );
		}else if("LOGINNAME_ALREADY_REGISTERED" === resultStr){
			alert( "此账号已经被注册" );
		}else if("ERROR_PARAM" === resultStr){
			alert( "输入参数错误，请检查输入" );
		}else if("REGISTER_CODE_INVALID" === resultStr){
			alert( "注册码无效" );
		}else{
			alert( resultStr );
		}
	}
});
</script>
</head>
<body class="login-bg" style='background-image: url("img/bgs/blueish.jpg");'>

  <div class="Login logoCont" >
  <div class="logoCont1200">
    <form action="registerUser!saveRegiserUser.action" method="post" id="register_form">
      <h2>
      	<fmt:message key="i18n.newUserReg" />
      
      	<span style="float: right;padding-right: 10px;font-size: 14px;">
      		<a href="login.jsp">&gt;&gt;<fmt:message key="i18n.login" /></a>
      	</span>
      </h2>
      <div class="bd">
        <ul>
          <%--  登录账号 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.loginName" />：</div>
            <div class="right"><input type="text" name="registerUserDTO.loginName" id="registerAccount" 
            	onBlur="checkLoginNameExist(this.value,'checkLoginNameExistResult')" placeholder="<fmt:message key="i18n.loginName" />" class="srk1"/><span id="checkLoginNameExistResult"></span></div>
          </li>
          <%--  登录密码 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.loginPassword" />：</div>
            <div class="right"><input type="password" name="registerUserDTO.password1" id="registerPwd" placeholder="<fmt:message key="i18n.regInputPwd" />" class="srk1"/></div>
          </li>
          
          <%--  确认密码 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.cofimPassword" />：</div>
            <div class="right"><input type="password" placeholder="<fmt:message key="i18n.regInputRepwd" />" id="registerPwdCheck" class="srk1"/></div>
          </li>
          <%--  交易密码 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.send2Password" />：</div>
            <div class="right"><input type="password" name="registerUserDTO.password2" id="reg_password2" placeholder="<fmt:message key="i18n.regInputPwd" />" class="srk1"/></div>
          </li>
          <%--  确认密码 --%>
          <li>
      		<div class="left"><i>*</i><fmt:message key="i18n.cofimsend2Password"/>：</div>
      		<div class="right">
      		<input type="password" value="" id="reg_conf_password2" class="srk1" />&nbsp;<label class="tip">*</label>
      		<label class="tip tipText"></label>
      		</div>
          </li>
          <%--  注册级别 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.userlevel" />：</div>
            <div class="right">
            	<select class="srk1" name="registerUserDTO.registerLevel">
					<option value="L1"><fmt:message key="L1" />(3000)</option>
					<option value="L2"><fmt:message key="L2" />(5000)</option>
					<option value="L3"><fmt:message key="L3" />(10000)</option>
					<option value="L4"><fmt:message key="L4" />(20000)</option>
				</select>
            </div>
          </li>
          
          <%--  推荐人 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.recommendUser" />：</div>
            <div class="right">
            	<input type="text" class="srk1" name="registerUserDTO.recommendUser" id="reg_recommendUser" value="${recommendUser }" 
            			onBlur="findUserNameByLoginName(this.value,'reg_show_recommendUser')"  />
            </div>
          </li>
          <%--  姓名 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.piUserName" />：</div>
            <div class="right">
            	<input type="text" value="${userEntity.userName }" name="registerUserDTO.userName" id="reg_userName" class="srk1" />
            </div>
          </li>
          <%--  银行 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.openUserBank" />：</div>
            <div class="right">
            	<select class="srk1" id="accountType" name="registerUserDTO.accountType">
					<%-- <option value="">--<fmt:message key="i18n.pelaseSelect"/>--</option> --%>
					<option value="中国农业银行"><fmt:message key="i18n.abcBank"/></option>
					<option value="中国工商银行"><fmt:message key="i18n.gongBank"/></option>
					<option value="中国建设银行"><fmt:message key="i18n.ccbBank"/></option>
					<option value="中国交通银行"><fmt:message key="i18n.jiaoBank"/></option>
					<option value="中国浦发银行"><fmt:message key="i18n.pufaBank"/></option>
					<option value="中国银行"><fmt:message key="i18n.chinaBank"/></option>
					<option value="中国邮政"><fmt:message key="i18n.emsBank"/></option>
					
					<option value="中信银行"><fmt:message key="i18n.zhongxinBank"/></option>
					<option value="招商银行"><fmt:message key="i18n.cmbchina"/></option>
					<option value="光大银行"><fmt:message key="i18n.cebbank"/></option>
					<option value="平安银行"><fmt:message key="i18n.pingan"/></option>
					<option value="华夏银行"><fmt:message key="i18n.hxb"/></option>
					
					<option value="财付通"><fmt:message key="i18n.caifutong"/></option>
					<option value="支付宝">支付宝</option>
				</select>
            </div>
          </li>
          
          <%--  银行账号 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.piBrankAccount" />：</div>
            <div class="right">
            	<input type="text" id="reg_bankAccount" value="${userEntity.bankAccount }" name="registerUserDTO.bankAccount" class="srk1" />
            </div>
          </li>
          
          <%--  银行开户地址 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.openBankAddress" />：</div>
            <div class="right">
            	<input type="text" id="reg_openBankAddress" value="${userEntity.openBankAddress }" name="registerUserDTO.openBankAddress" class="srk1" />
            </div>
          </li>
          
          <%--  身份证号 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.idNumber" />：</div>
            <div class="right">
            	<input type="text" id="IDNumber" value="" name="registerUserDTO.idNumber" class="srk1" />
            </div>
          </li>
          
          <%--  手机号码 --%>
          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.mobileNo"/>：</div>
            <div class="right"><input type="text" name="registerUserDTO.mobile" id="registerMobile" placeholder="<fmt:message key="i18n.mobileNo"/>" class="srk1"/></div>
          </li>

          <li>
            <div class="left"><i>*</i><fmt:message key="i18n.mobileCode" />：</div>
            <div class="right">
            	<input type="text" id="registerAuthCode" name="registerUserDTO.authCode" placeholder="<fmt:message key="i18n.regInputVerificationCode" />" class="srk1"/>
            </div>
          </li>
          <li>
          	<div class="left">&nbsp;</div>
          	<div class="right">
          		<input id="getRegisterAuthCode" onclick="getVerificationCode('Mobile','Register','#registerMobile','#getRegisterAuthCode')" type="button" value="<fmt:message key="i18n.getVerificationCode" />" class="yz"/><br/>
            	<!-- <span id="registerAccount_show">&nbsp;</span> -->
           	</div>
          </li>
		  <li>
            <div class="left"><i>*</i><fmt:message key ="i18n.consentAgreement" />：</div>
            <div class="right">
            	<input type="checkbox" id="membershipAgreement" style="height: 25px;width: 25px;"/>
            	<span style="line-height: 25px;position: relative;top:-6px;"><a href="agreement.jsp" target="_blank"><fmt:message key="i18n.lookAgreement" /></a></span>
            </div>
          </li>
          
          <li>
            <input id="register_form_submit" type="button" value="<fmt:message key="i18n.submitReg" />" class="ty_an"/>
          </li>
        </ul>
      </div>
    </form>
    </div>
  </div>
</body>
</html> 